package jhlee42;

import java.util.Scanner;

public class J09Account {

	public static void main(String[] args) {
		
		int aid[] = new int[2];
		int balance[] = new int[2]; 
		double interestRate[] = new double[2];
		String dateCreated[] = new String[2];
		double getMonthlyInterestRate[] = new double[2];
		int withDraw[] = new int[2];
		int deposit[] = new int[2];
		
		balance[1] = 20;
		dateCreated[1] = "2014-03-10";
		deposit[1] = 0;
		withDraw[1] = 0;
		
		
		
		
		
		getoutput(dateCreated, aid, balance, interestRate, withDraw, deposit, getMonthlyInterestRate);
	
		exam_1(aid, balance, getMonthlyInterestRate, withDraw);
		getcal(aid, balance, interestRate, withDraw, deposit, getMonthlyInterestRate);
		getoutput(dateCreated, aid, balance, interestRate, withDraw, deposit, getMonthlyInterestRate);
		
		exam_2(aid, balance, getMonthlyInterestRate, withDraw);
		getcal(aid, balance, interestRate, withDraw, deposit, getMonthlyInterestRate);
		getoutput(dateCreated, aid, balance, interestRate, withDraw, deposit, getMonthlyInterestRate);
	}
	
	
/*	public static void getscan(){
		int input;
		Scanner sc = new Scanner(System.in);
		input = sc.nextInt();
	}*/
	
	
	
	public static void getcal(int[] aid, int[] balance, double[] interestRate,int[] withDraw,int[] deposit,double[] getMonthlyInterestRate){
		getMonthlyInterestRate[1] = interestRate[1] / 12;
		balance[1] = balance[1] + deposit[1]; // 입금
		balance[1] = balance[1] - withDraw[1]; // 인출
	}
	public static void getoutput(String[] dateCreated,int[] aid, int[] balance, double[] interestRate,int[] withDraw,int[] deposit,double[] getMonthlyInterestRate){
		System.out.println("---------------------");
		System.out.println(aid[1]);
		System.out.println(interestRate[1]);
		System.out.println(dateCreated[1]);
		System.out.println(deposit[1]);
		System.out.println(withDraw[1]);
		System.out.println(getMonthlyInterestRate[1]);
		System.out.println(balance[1]);
	}
	public static void exam_1(int[] aid, int[] balance, double[] interestRate,int[] withDraw){
		aid[1] = 1122; // 계좌번호
		balance[1] = 20000; // 잔액
		interestRate[1] = 4.5; // 연이율
		withDraw[1] = 2500;
	}
	public static void exam_2(int[] aid, int[] balance, double[] interestRate,int[] withDraw){
		aid[1] = 1122; // 계좌번호
		balance[1] = 20000; // 잔액
		interestRate[1] = 4.5; // 연이율
		withDraw[1] = 3000;
	}
	
	
	
	

}
